#ifndef SMURF_SUBCONTROLL_ITEM_H
#define SMURF_SUBCONTROLL_ITEM_H

#include <goocanvas.h>
#include <broadcast.h>
#include <subControllItem.h>

namespace View {

  class SmurfSubControllItem;

  class SmurfAttackButton : public IconButton
  {
    bool buttonType; // true means play , false means pause
    SmurfSubControllItem *smurfControll;
  public:
  SmurfAttackButton(GooCanvasItem * newParent,
		    gdouble x,gdouble y,
		    GdkPixbuf *bg,GdkPixbuf *mg,GdkPixbuf *fg,
		    bool newButtonType,SmurfSubControllItem *newSmurfControll)
    :IconButton(newParent,x,y,bg,mg,fg),
      buttonType(newButtonType),
      smurfControll(newSmurfControll)
      {}
    virtual bool OnClicked();
  };

  class SmurfSubControllItem : public SubControllItem
  {
    GtkWidget *targetIPEntry;
    GtkWidget *broadcastAddrEntry;
    GooCanvasItem *targetIPMsg;
    GooCanvasItem *broadcastAddrMsg;
    GooCanvasItem *smurfDetailMsg;
    SmurfAttackButton *startAttack;
    SmurfAttackButton *stopAttack;
  public:
    SmurfSubControllItem(GooCanvasItem *parent);
    ~SmurfSubControllItem();

    virtual int OnReceive(Controller::Broadcast *broadcast);
    virtual bool SendAllAddress();
    virtual bool CheckInputData();
  };

}

#endif
